<?php
				//VALIDATING DATE
				$datearr=explode("-",$_POST['date']);
				if(!ereg("^[0-3]?[0-9][\./\-][0-1]?[0-9][\./\-]20[0-9][0-9]$",$_POST['date']) or !checkdate($datearr[1],$datearr[0],$datearr[2]))
				{
						echo "Check Your Input Date<br>";
						$valid=0;
				}
				else
						$date=date("Y-m-d",mktime(0,0,0,$datearr[1],$datearr[0],$datearr[2]));

				//VALIDATING AMOUNT
				$amount=(int)$_POST['amount'];
				
				if(!ereg("^[0-9]+$",$_POST['amount']) or ($amount=(int)$_POST['amount'])==0 )
				{
					echo "<br>Check Your Amount Input<br>";
					$valid=0;
				}
?>				
